package com.rms.server.Service;

import com.rms.server.Dao.UserDao;
import com.rms.server.Domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    private UserDao userDao;

    public User findByUidAddUpassword(Long id, String password) {
        return userDao.findByUidAddUpassword(id, password);
    }

    public User finByUid(Long id) {
        return userDao.findByUid(id);
    }

    public void insertUser(String password,
                           String name,
                           String role,
                           String avatar) {
        userDao.insertUser(password, name, role, avatar);
    }
}
